package com.jason.auto.common;

import lombok.Getter;

/**
 * 错误码
 */
@Getter
public enum ResultCode {
    SUCCESS(0, "成功"),

    /**
     * 11开头的跟具体业务相关
     */
    USER_NOT_FOUND(11001, "用户不存在"),
    USER_NAME_EXIST(11002, "用户名已经存在"),
    USER_PHONE_EXIST(11003, "手机号码已经存在"),
    /**
     * 10开头的跟系统相关
     */
    PARAM_ERROR(10001, "请求参数错误"),

    PARAM_INVALID(10002, "请求参数无效"),

    RESOURCE_NOT_FOUND(10003, "接口不存在"),

    SYSTEM_ERROR(10999, "服务器内部错误");

    private int code;
    private final String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
